<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
class Controller_About extends Controller_Template {
    public function actionIndex ()
    {
    	$this->template->title = "ABOUT US-" . $this->settings ['title'];
    	$this->template->content = new View ('about/index');
    	$content = Model::factory ('directory')->getItemByToken ('wjz', 'text');
    	$this->template->content->aboutContent = $content;
    	$items = Model::factory ('directory')->getItems ('about', 'position', 'ASC');
    	$this->template->content->items = $items;
    	$this->template->content->attachmentPath = "/content/directory/attachments/";

	$attachments = Model::factory ('directory')->getAttachmentsByItem ('about');
    	$this->template->content->attachments = $attachments;

	$images = Model::factory ('directory')->getImagesByItem('about');
    	$this->template->content->images = $images;

	if(!empty($images)) {
		$this->addScript('/scripts/jquerytools/jquery.tools.min.js');
		$this->addScript('/scripts/plugin/gallery.js');
		$this->addStyle('/styles/jquerytools/overlay.css');
		$this->addStyle('/styles/jquerytools/gallery.css');
	}
    }
}
?>
